import Vue from 'vue'
import App from './App'
import { pay } from "@/service";

Vue.config.productionTip = false

Vue.prototype.$pay=async ()=>{
  let result = await pay({total_fee: 1});
  console.log('params...', result.data);
  let {timeStamp, nonceStr, paySign} = result.data;
  let params = {
      timeStamp,
      nonceStr,
      package: result.data.package,
      signType: 'MD5',
      paySign
  };
  console.log('params...', params);
  wx.requestPayment(params);
}

App.mpType = 'app'

const app = new Vue({
  ...App
})
app.$mount()
